package com.learn.training.multithread.chapter8.demo1;

public class Demo {
    public static void main(String[] args) throws InterruptedException {
        Task task = new Task();
        Thread t = new Thread(task);
        t.start();
        t.join(); // 等待线程执行完毕
        System.out.println("Result: " + task.getResult());
    }
}
